import request from '@/utils/request'

// 查询党建学习资源列表
export function listPartyStudy(query) {
  return request({
    url: '/api/party-study/list',
    method: 'get',
    params: query
  })
}

// 查询详情
export function getPartyStudy(id) {
  return request({
    url: '/api/party-study/' + id,
    method: 'get'
  })
}

// 新增
export function addPartyStudy(data) {
  return request({
    url: '/api/party-study',
    method: 'post',
    data: data
  })
}

// 修改
export function updatePartyStudy(data) {
  return request({
    url: '/api/party-study',
    method: 'put',
    data: data
  })
}

// 删除
export function delPartyStudy(id) {
  return request({
    url: '/api/party-study/' + id,
    method: 'delete'
  })
}

// 导出
export function exportPartyStudy(query) {
  return request({
    url: '/api/party-study/export',
    method: 'post',
    data: query,
    responseType: 'blob'
  })
}

